package helloworld.delegate.center;

import helloworld.exception.DuplicateCenterException;
import helloworld.admin.bean.*;
import helloworld.admin.service.center.CenterControllerService;
import helloworld.admin.service.center.CenterServiceException;
/**
 *
 * @author Tuyen-DM 
 * @version $Revision:   $ $Date: 20090424  $
 */
public class CenterDelegate {

	public CenterAdminBean getCenterDetail(String centerName) throws CenterServiceException{
		CenterControllerService centService = new CenterControllerService();
		return centService.getCenterDetail(centerName);
	}
	
	public int createCenter(CenterAdminBean center)throws CenterServiceException,DuplicateCenterException{
		CenterControllerService centService = new CenterControllerService();
		return centService.createCenter(center);
	}
	
	public void updateCenter(CenterAdminBean center)throws CenterServiceException,DuplicateCenterException{
		CenterControllerService centService = new CenterControllerService();
		centService.updateCenter(center);
	}
	
	public void deleteCenter(int id)throws CenterServiceException{
		CenterControllerService centService = new CenterControllerService();
		centService.deleteCenter(id);
	}
}
